****************************************************************************************************************
*Wahlergebnis AfD Zweitstimmen WK & Strukturdaten WK Bundeswahlleiter zur Bundestagswahl 2021
****************************************************************************************************************

***Inhalt:
*Zweitstimmenergebnis AfD BTW2021
*Geburtensaldo
*Wanderungssaldo
*Wahlergebnis rechter Parteien 2013
*Anteil Ausländer:innen in Bevölkerung
*Wahlbeteiligung BTW2021

***afd - Zweitstimmenergebnis der AfD bei der Bundestagswahl 2021 pro Wahlkreis (source: Der Bundeswahlleiter 2021a) 
gen afd = .
replace afd = 8.4 if wknr == 3
replace afd = 7.4 if wknr == 6
replace afd = 6.9 if wknr == 7
replace afd = 7.1 if wknr == 9
replace afd = 6.8 if wknr == 11
replace afd = 17.1 if wknr == 13
replace afd = 12.7 if wknr == 14
replace afd = 18.9 if wknr == 15
replace afd = 23.2 if wknr == 16
replace afd = 5.1 if wknr == 18
replace afd = 3.3 if wknr == 19
replace afd = 3.5 if wknr == 20
replace afd = 3.7 if wknr == 21
replace afd = 6.5 if wknr == 22
replace afd = 8.0 if wknr == 23
replace afd = 8.2 if wknr == 24
replace afd = 8.2 if wknr == 26
replace afd = 5.2 if wknr == 27
replace afd = 5.1 if wknr == 31
replace afd = 7.1 if wknr == 33
replace afd = 8.0 if wknr == 35
replace afd = 7.3 if wknr == 36
replace afd = 6.7 if wknr == 38
replace afd = 6.0 if wknr == 41
replace afd = 4.7 if wknr == 42
replace afd = 9.2 if wknr == 44
replace afd = 7.7 if wknr == 47
replace afd = 9.9 if wknr == 49
replace afd = 5.9 if wknr == 50
replace afd = 6.1 if wknr == 53
replace afd = 5.3 if wknr == 54
replace afd = 8.9 if wknr == 55
replace afd = 19.2 if wknr == 56
replace afd = 19.9 if wknr == 57
replace afd = 15.9 if wknr == 58
replace afd = 9.9 if wknr == 61
replace afd = 17.9 if wknr == 62
replace afd = 20.2 if wknr == 63
replace afd = 24.3 if wknr == 64
replace afd = 19.1 if wknr == 66
replace afd = 18.1 if wknr == 68
replace afd = 15.1 if wknr == 69
replace afd = 19.0 if wknr == 70
replace afd = 22.6 if wknr == 71
replace afd = 14.9 if wknr == 72
replace afd = 24.9 if wknr == 73
replace afd = 5.1 if wknr == 75
replace afd = 8.8 if wknr == 76
replace afd = 9.8 if wknr == 77
replace afd = 10.3 if wknr == 78
replace afd = 5.7 if wknr == 79
replace afd = 4.8 if wknr == 80
replace afd = 6.2 if wknr == 81
replace afd = 7.4 if wknr == 82
replace afd = 4.1 if wknr == 83
replace afd = 12.3 if wknr == 84
replace afd = 16.8 if wknr == 85
replace afd = 12.5 if wknr == 86
replace afd = 7.9 if wknr == 89
replace afd = 7.8 if wknr == 92
replace afd = 6.0 if wknr == 93
replace afd = 2.9 if wknr == 94
replace afd = 5.1 if wknr == 95
replace afd = 4.2 if wknr == 96
replace afd = 7.2 if wknr == 101
replace afd = 7.7 if wknr == 103
replace afd = 7.4 if wknr == 105
replace afd = 4.3 if wknr == 106
replace afd = 6.0 if wknr == 107
replace afd = 7.0 if wknr == 108
replace afd = 6.0 if wknr == 110
replace afd = 5.7 if wknr == 112
replace afd = 7.0 if wknr == 114
replace afd = 8.3 if wknr == 115
replace afd = 12.2 if wknr == 116
replace afd = 8.0 if wknr == 118
replace afd = 11.0 if wknr == 119
replace afd = 5.5 if wknr == 120
replace afd = 12.8 if wknr == 123
replace afd = 5.4 if wknr == 124
replace afd = 9.4 if wknr == 125
replace afd = 4.8 if wknr == 126
replace afd = 6.8 if wknr == 132
replace afd = 8.7 if wknr == 136
replace afd = 8.1 if wknr == 137
replace afd = 6.7 if wknr == 140
replace afd = 9.8 if wknr == 141
replace afd = 6.9 if wknr == 142
replace afd = 7.9 if wknr == 143
replace afd = 7.8 if wknr == 144
replace afd = 8.0 if wknr == 146
replace afd = 7.4 if wknr == 147
replace afd = 15.6 if wknr == 152
replace afd = 11.2 if wknr == 153
replace afd = 24.0 if wknr == 154
replace afd = 29.8 if wknr == 155
replace afd = 31.9 if wknr == 156
replace afd = 32.5 if wknr == 157
replace afd = 31.9 if wknr == 158
replace afd = 17.9 if wknr == 159
replace afd = 19.2 if wknr == 160
replace afd = 30.0 if wknr == 161
replace afd = 21.6 if wknr == 162
replace afd = 27.3 if wknr == 163
replace afd = 30.6 if wknr == 164
replace afd = 25.1 if wknr == 165
replace afd = 10.8 if wknr == 170
replace afd = 11.6 if wknr == 172
replace afd = 13.3 if wknr == 174
replace afd = 7.8 if wknr == 176
replace afd = 8.5 if wknr == 177
replace afd = 8.5 if wknr == 178
replace afd = 6.7 if wknr == 180
replace afd = 5.5 if wknr == 182
replace afd = 4.7 if wknr == 183
replace afd = 24.5 if wknr == 190
replace afd = 26.0 if wknr == 192
replace afd = 16.2 if wknr == 193
replace afd = 28.1 if wknr == 194
replace afd = 28.2 if wknr == 195
replace afd = 26.4 if wknr == 196
replace afd = 7.7 if wknr == 198
replace afd = 7.1 if wknr == 199
replace afd = 9.9 if wknr == 201
replace afd = 11.8 if wknr == 207
replace afd = 10.4 if wknr == 211
replace afd = 9.1 if wknr == 214
replace afd = 6.9 if wknr == 215
replace afd = 10.0 if wknr == 216
replace afd = 4.7 if wknr == 217
replace afd = 4.6 if wknr == 218
replace afd = 4.6 if wknr == 219
replace afd = 4.3 if wknr == 220
replace afd = 8.6 if wknr == 225
replace afd = 14.1 if wknr == 227
replace afd = 11.8 if wknr == 229
replace afd = 13.2 if wknr == 231
replace afd = 8.8 if wknr == 233
replace afd = 9.6 if wknr == 236
replace afd = 11.7 if wknr == 239
replace afd = 9.0 if wknr == 243
replace afd = 10.0 if wknr == 244
replace afd = 8.5 if wknr == 245
replace afd = 9.4 if wknr == 247
replace afd = 10.6 if wknr == 248
replace afd = 8.9 if wknr == 249
replace afd = 9.6 if wknr == 253
replace afd = 11.9 if wknr == 255
replace afd = 4.2 if wknr == 258
replace afd = 7.2 if wknr == 259
replace afd = 8.7 if wknr == 260
replace afd = 8.9 if wknr == 264
replace afd = 10.1 if wknr == 266
replace afd = 11.8 if wknr == 269
replace afd = 6.8 if wknr == 271
replace afd = 10.6 if wknr == 273
replace afd = 12.0 if wknr == 276
replace afd = 8.2 if wknr == 282
replace afd = 9.9 if wknr == 284
replace afd = 13.4 if wknr == 285
replace afd = 10.3 if wknr == 289
replace afd = 9.1 if wknr == 291
replace afd = 10.8 if wknr == 292
replace afd = 9.3 if wknr == 296

***gburt - Geburtensaldo der Bevölkerung 2019 (je 1000 EW) pro Wahlkreis (source: Der Bundeswahlleiter 2021c) 
gen gburt = .
replace gburt = -5.3 if wknr == 3
replace gburt = -4.0 if wknr == 6
replace gburt = -2.5 if wknr == 7
replace gburt = -6.7 if wknr == 9
replace gburt = -4.2 if wknr == 11
replace gburt = -5.7 if wknr == 13
replace gburt = -3.1 if wknr == 14
replace gburt = -6.2 if wknr == 15
replace gburt = -8.1 if wknr == 16
replace gburt = 1.9 if wknr == 18
replace gburt = 1.9 if wknr == 19
replace gburt = 1.9 if wknr == 20
replace gburt = 1.9 if wknr == 21
replace gburt = 1.9 if wknr == 22
replace gburt = 1.9 if wknr == 23
replace gburt = -3.4 if wknr == 24
replace gburt = -5.8 if wknr == 26
replace gburt = -1.0 if wknr == 27
replace gburt = -0.6 if wknr == 31
replace gburt = -2.9 if wknr == 33
replace gburt = -2.8 if wknr == 35
replace gburt = -1.6 if wknr == 36
replace gburt = -0.8 if wknr == 38
replace gburt = 0.0 if wknr == 41
replace gburt = 0.0 if wknr == 42
replace gburt = -4.7 if wknr == 44
replace gburt = -3.0 if wknr == 47
replace gburt = -4.3 if wknr == 49
replace gburt = -1.3 if wknr == 50
replace gburt = -3.5 if wknr == 53
replace gburt = -0.5 if wknr == 54
replace gburt = -1.1 if wknr == 55
replace gburt = -7.3 if wknr == 56
replace gburt = -6.5 if wknr == 57
replace gburt = -3.2 if wknr == 58
replace gburt = -0.5 if wknr == 61
replace gburt = -4.0 if wknr == 62
replace gburt = -6.1 if wknr == 63
replace gburt = -6.7 if wknr == 64
replace gburt = -6.3 if wknr == 66
replace gburt = -9.5 if wknr == 68
replace gburt = -4.9 if wknr == 69
replace gburt = -9.6 if wknr == 70
replace gburt = -9.3 if wknr == 71
replace gburt = -2.3 if wknr == 72
replace gburt = -8.4 if wknr == 73
replace gburt = 1.3 if wknr == 75
replace gburt = 1.3 if wknr == 76
replace gburt = 1.3 if wknr == 77
replace gburt = 1.3 if wknr == 78
replace gburt = 1.3 if wknr == 79
replace gburt = 1.3 if wknr == 80
replace gburt = 1.3 if wknr == 81
replace gburt = 1.3 if wknr == 82
replace gburt = 1.3 if wknr == 83
replace gburt = 1.3 if wknr == 84
replace gburt = 1.3 if wknr == 85
replace gburt = 1.3 if wknr == 86
replace gburt = -2.4 if wknr == 89
replace gburt = -2.9 if wknr == 92
replace gburt = 1.4 if wknr == 93
replace gburt = 1.4 if wknr == 94
replace gburt = 1.4 if wknr == 95
replace gburt = 1.1 if wknr == 96
replace gburt = -0.1 if wknr == 101
replace gburt = -2.9 if wknr == 103
replace gburt = -4.0 if wknr == 105
replace gburt = 0.2 if wknr == 106
replace gburt = 0.2 if wknr == 107
replace gburt = -1.9 if wknr == 108
replace gburt = -3.2 if wknr == 110
replace gburt = -2.6 if wknr == 112
replace gburt = -3.3 if wknr == 114
replace gburt = -1.9 if wknr == 115
replace gburt = -1.9 if wknr == 116
replace gburt = -3.4 if wknr == 118
replace gburt = -1.8 if wknr == 119
replace gburt = -1.8 if wknr == 120
replace gburt = -3.1 if wknr == 123
replace gburt = 0.3 if wknr == 124
replace gburt = -3.2 if wknr == 125
replace gburt = -0.3 if wknr == 126
replace gburt = -0.2 if wknr == 132
replace gburt = -3.4 if wknr == 136
replace gburt = 0.7 if wknr == 137
replace gburt = -3.4 if wknr == 140
replace gburt = -4.1 if wknr == 141
replace gburt = -1.7 if wknr == 142
replace gburt = -1.7 if wknr == 143
replace gburt = -4.3 if wknr == 144
replace gburt = -2.3 if wknr == 146
replace gburt = -3.8 if wknr == 147
replace gburt = 0.4 if wknr == 152
replace gburt = 0.4 if wknr == 153
replace gburt = -6.2 if wknr == 154
replace gburt = -6.1 if wknr == 155
replace gburt = -6.9 if wknr == 156
replace gburt = -9.0 if wknr == 157
replace gburt = -5.8 if wknr == 158
replace gburt = 0.5 if wknr == 159
replace gburt = -0.2 if wknr == 160
replace gburt = -7.0 if wknr == 161
replace gburt = -5.2 if wknr == 162
replace gburt = -7.9 if wknr == 163
replace gburt = -8.7 if wknr == 164
replace gburt = -8.5 if wknr == 165
replace gburt = -5.0 if wknr == 170
replace gburt = -3.4 if wknr == 172
replace gburt = -2.3 if wknr == 174
replace gburt = -2.6 if wknr == 176
replace gburt = -1.7 if wknr == 177
replace gburt = -3.3 if wknr == 178
replace gburt = -0.7 if wknr == 180
replace gburt = 3.9 if wknr == 182
replace gburt = 3.9 if wknr == 183
replace gburt = -5.8 if wknr == 190
replace gburt = -5.6 if wknr == 192
replace gburt = -1.7 if wknr == 193
replace gburt = -8.5 if wknr == 194
replace gburt = -7.5 if wknr == 195
replace gburt = -8.6 if wknr == 196
replace gburt = -3.7 if wknr == 198
replace gburt = -2.7 if wknr == 199
replace gburt = -3.3 if wknr == 201
replace gburt = -1.1 if wknr == 207
replace gburt = -2.0 if wknr == 211
replace gburt = 1.3 if wknr == 214
replace gburt = 1.1 if wknr == 215
replace gburt = 2.0 if wknr == 216
replace gburt = 4.2 if wknr == 217
replace gburt = 4.2 if wknr == 218
replace gburt = 4.2 if wknr == 219
replace gburt = 4.2 if wknr == 220
replace gburt = -1.8 if wknr == 225
replace gburt = -2.4 if wknr == 227
replace gburt = -3.1 if wknr == 229
replace gburt = -2.2 if wknr == 231
replace gburt = 0.8 if wknr == 233
replace gburt = -0.2 if wknr == 236
replace gburt = -6.1 if wknr == 239
replace gburt = -1.0 if wknr == 243
replace gburt = -0.9 if wknr == 244
replace gburt = -1.1 if wknr == 245
replace gburt = -1.1 if wknr == 247
replace gburt = -3.2 if wknr == 248
replace gburt = -2.3 if wknr == 249
replace gburt = 0.2 if wknr == 253
replace gburt = 0.4 if wknr == 255
replace gburt = 2.3 if wknr == 258
replace gburt = 2.3 if wknr == 259
replace gburt = 1.5 if wknr == 260
replace gburt = 0.0 if wknr == 264
replace gburt = 0.5 if wknr == 266
replace gburt = -1.8 if wknr == 269
replace gburt = -0.4 if wknr == 271
replace gburt = -2.8 if wknr == 273
replace gburt = -2.6 if wknr == 276
replace gburt = -0.7 if wknr == 282
replace gburt = -1.4 if wknr == 284
replace gburt = -0.6 if wknr == 285
replace gburt = 0.0 if wknr == 289
replace gburt = 0.8 if wknr == 291
replace gburt = 1.6 if wknr == 292
replace gburt = -4.0 if wknr == 296

***wander - Wanderungssaldo der Bevölkerung 2019 (je 1000 EW) pro Wahlkreis (source: Der Bundeswahlleiter 2021c) 
gen wander = .
replace wander = 4.6 if wknr == 3
replace wander = 5.1 if wknr == 6
replace wander = 8.1 if wknr == 7
replace wander = 6.8 if wknr == 9
replace wander = 1.3 if wknr == 11
replace wander = 7.5 if wknr == 13
replace wander = 6.0 if wknr == 14
replace wander = 6.7 if wknr == 15
replace wander = 2.8 if wknr == 16
replace wander = 2.7 if wknr == 18
replace wander = 2.7 if wknr == 19
replace wander = 2.7 if wknr == 20
replace wander = 2.7 if wknr == 21
replace wander = 2.7 if wknr == 22
replace wander = 2.7 if wknr == 23
replace wander = 2.0 if wknr == 24
replace wander = 6.4 if wknr == 26
replace wander = 6.7 if wknr == 27
replace wander = 5.2 if wknr == 31
replace wander = 4.7 if wknr == 33
replace wander = 8.8 if wknr == 35
replace wander = 8.4 if wknr == 36
replace wander = 3.6 if wknr == 38
replace wander = 0.1 if wknr == 41
replace wander = 0.1 if wknr == 42
replace wander = 4.5 if wknr == 44
replace wander = 3.8 if wknr == 47
replace wander = -0.4 if wknr == 49
replace wander = 6.0 if wknr == 50
replace wander = -1.6 if wknr == 53
replace wander = -1.8 if wknr == 54
replace wander = -0.4 if wknr == 55
replace wander = 5.4 if wknr == 56
replace wander = 7.2 if wknr == 57
replace wander = 12.3 if wknr == 58
replace wander = 14.9 if wknr == 61
replace wander = 12.5 if wknr == 62
replace wander = 6.4 if wknr == 63
replace wander = 1.0 if wknr == 64
replace wander = -0.4 if wknr == 66
replace wander = 4.1 if wknr == 68
replace wander = -0.4 if wknr == 69
replace wander = -0.1 if wknr == 70
replace wander = 1.1 if wknr == 71
replace wander = 0.7 if wknr == 72
replace wander = 1.0 if wknr == 73
replace wander = 6.3 if wknr == 75
replace wander = 6.3 if wknr == 76
replace wander = 6.3 if wknr == 77
replace wander = 6.3 if wknr == 78
replace wander = 6.3 if wknr == 79
replace wander = 6.3 if wknr == 80
replace wander = 6.3 if wknr == 81
replace wander = 6.3 if wknr == 82
replace wander = 6.3 if wknr == 83
replace wander = 6.3 if wknr == 84
replace wander = 6.3 if wknr == 85
replace wander = 6.3 if wknr == 86
replace wander = 7.1 if wknr == 89
replace wander = 5.7 if wknr == 92
replace wander = 0.4 if wknr == 93
replace wander = 0.4 if wknr == 94
replace wander = 0.4 if wknr == 95
replace wander = 5.9 if wknr == 96
replace wander = 0.8 if wknr == 101
replace wander = 3.5 if wknr == 103
replace wander = 4.1 if wknr == 105
replace wander = 3.1 if wknr == 106
replace wander = 3.1 if wknr == 107
replace wander = 2.4 if wknr == 108
replace wander = 5.1 if wknr == 110
replace wander = 7.7 if wknr == 112
replace wander = 5.3 if wknr == 114
replace wander = 2.2 if wknr == 115
replace wander = 2.2 if wknr == 116
replace wander = 2.2 if wknr == 118
replace wander = 0.4 if wknr == 119
replace wander = 0.4 if wknr == 120
replace wander = -0.9 if wknr == 123
replace wander = 3.0 if wknr == 124
replace wander = 3.4 if wknr == 125
replace wander = 1.3 if wknr == 126
replace wander = 2.0 if wknr == 132
replace wander = 1.6 if wknr == 136
replace wander = 2.9 if wknr == 137
replace wander = 5.4 if wknr == 140
replace wander = 5.1 if wknr == 141
replace wander = 2.5 if wknr == 142
replace wander = 2.5 if wknr == 143
replace wander = 3.8 if wknr == 144
replace wander = 1.9 if wknr == 146
replace wander = 1.1 if wknr == 147
replace wander = 8.8 if wknr == 152
replace wander = 8.8 if wknr == 153
replace wander = 7.6 if wknr == 154
replace wander = 4.6 if wknr == 155
replace wander = 1.6 if wknr == 156
replace wander = 1.0 if wknr == 157
replace wander = 5.7 if wknr == 158
replace wander = 3.8 if wknr == 159
replace wander = 4.7 if wknr == 160
replace wander = 0.1 if wknr == 161
replace wander = 1.9 if wknr == 162
replace wander = 2.5 if wknr == 163
replace wander = -0.4 if wknr == 164
replace wander = 0.1 if wknr == 165
replace wander = 2.1 if wknr == 170
replace wander = 1.9 if wknr == 172
replace wander = 3.3 if wknr == 174
replace wander = 3.3 if wknr == 176
replace wander = 7.6 if wknr == 177
replace wander = 3.7 if wknr == 178
replace wander = 6.6 if wknr == 180
replace wander = 8.8 if wknr == 182
replace wander = 8.8 if wknr == 183
replace wander = 0.1 if wknr == 190
replace wander = 2.0 if wknr == 192
replace wander = 4.1 if wknr == 193
replace wander = -0.2 if wknr == 194
replace wander = 1.7 if wknr == 195
replace wander = 2.1 if wknr == 196
replace wander = 6.1 if wknr == 198
replace wander = 2.6 if wknr == 199
replace wander = 5.9 if wknr == 201
replace wander = 6.0 if wknr == 207
replace wander = 3.3 if wknr == 211
replace wander = 5.3 if wknr == 214
replace wander = 1.9 if wknr == 215
replace wander = 2.0 if wknr == 216
replace wander = 5.8 if wknr == 217
replace wander = 5.8 if wknr == 218
replace wander = 5.8 if wknr == 219
replace wander = 5.8 if wknr == 220
replace wander = 4.1 if wknr == 225
replace wander = 3.6 if wknr == 227
replace wander = 7.0 if wknr == 229
replace wander = 3.2 if wknr == 231
replace wander = 1.7 if wknr == 233
replace wander = 0.3 if wknr == 236
replace wander = 0.9 if wknr == 239
replace wander = 6.3 if wknr == 243
replace wander = 0.6 if wknr == 244
replace wander = 1.5 if wknr == 245
replace wander = 3.1 if wknr == 247
replace wander = 2.5 if wknr == 248
replace wander = 1.5 if wknr == 249
replace wander = 8.5 if wknr == 253
replace wander = 7.5 if wknr == 255
replace wander = -0.2 if wknr == 258
replace wander = -0.2 if wknr == 259
replace wander = 1.8 if wknr == 260
replace wander = 2.1 if wknr == 264
replace wander = 4.6 if wknr == 266
replace wander = 4.4 if wknr == 269
replace wander = -1.0 if wknr == 271
replace wander = 5.1 if wknr == 273
replace wander = 3.7 if wknr == 276
replace wander = 3.6 if wknr == 282
replace wander = 5.1 if wknr == 284
replace wander = 4.5 if wknr == 285
replace wander = 2.8 if wknr == 289
replace wander = 4.1 if wknr == 291
replace wander = 5.4 if wknr == 292
replace wander = 2.0 if wknr == 296

***npd - Wahlergebnis rechter Parteien bei der Bundestagswahl 2013 pro Wahlkreis (source: Der Bundeswahlleiter 2013) 
gen npd = .
replace npd = 0.8 if wknr == 3
replace npd = 0.9 if wknr == 6
replace npd = 0.7 if wknr == 7
replace npd = 0.6 if wknr == 9
replace npd = 0.8 if wknr == 11
replace npd = 2.9 if wknr == 13
replace npd = 1.8 if wknr == 14
replace npd = 2.6 if wknr == 15
replace npd = 4.9 if wknr == 16
replace npd = 0.8 if wknr == 18
replace npd = 0.4 if wknr == 19
replace npd = 0.4 if wknr == 20
replace npd = 0.4 if wknr == 21
replace npd = 0.9 if wknr == 22
replace npd = 1.0 if wknr == 23
replace npd = 1.1 if wknr == 24
replace npd = 1.1 if wknr == 26
replace npd = 0.7 if wknr == 27
replace npd = 0.6 if wknr == 31
replace npd = 1.0 if wknr == 33
replace npd = 1.2 if wknr == 35
replace npd = 0.9 if wknr == 36
replace npd = 0.8 if wknr == 38
replace npd = 0.8 if wknr == 41
replace npd = 0.7 if wknr == 42
replace npd = 1.2 if wknr == 44
replace npd = 1.1 if wknr == 47
replace npd = 1.4 if wknr == 49
replace npd = 0.9 if wknr == 50
replace npd = 1.0 if wknr == 53
replace npd = 0.9 if wknr == 54
replace npd = 1.7 if wknr == 55
replace npd = 3.2 if wknr == 56
replace npd = 3.2 if wknr == 57
replace npd = 3.1 if wknr == 58
replace npd = 1.5 if wknr == 61
replace npd = 3.4 if wknr == 62
replace npd = 3.8 if wknr == 63
replace npd = 3.8 if wknr == 64
replace npd = 2.4 if wknr == 66
replace npd = 2.3 if wknr == 68
replace npd = 1.8 if wknr == 69
replace npd = 2.7 if wknr == 70
replace npd = 2.8 if wknr == 71
replace npd = 1.7 if wknr == 72
replace npd = 3.6 if wknr == 73
replace npd = 1.2 if wknr == 75
replace npd = 1.9 if wknr == 76
replace npd = 2.0 if wknr == 77
replace npd = 2.0 if wknr == 78
replace npd = 0.9 if wknr == 79
replace npd = 0.6 if wknr == 80
replace npd = 1.3 if wknr == 81
replace npd = 2.4 if wknr == 82
replace npd = 1.0 if wknr == 83
replace npd = 3.2 if wknr == 84
replace npd = 5.0 if wknr == 85
replace npd = 3.2 if wknr == 86
replace npd = 1.7 if wknr == 89
replace npd = 1.7 if wknr == 92
replace npd = 1.4 if wknr == 93
replace npd = 0.6 if wknr == 94
replace npd = 1.4 if wknr == 95
replace npd = 0.9 if wknr == 96
replace npd = 1.7 if wknr == 101
replace npd = 1.7 if wknr == 103
replace npd = 1.5 if wknr == 105
replace npd = 0.9 if wknr == 106
replace npd = 1.6 if wknr == 107
replace npd = 1.5 if wknr == 108
replace npd = 1.3 if wknr == 110
replace npd = 1.3 if wknr == 112
replace npd = 1.7 if wknr == 114
replace npd = 3.6 if wknr == 115
replace npd = 4.8 if wknr == 116
replace npd = 2.2 if wknr == 118
replace npd = 2.8 if wknr == 119
replace npd = 1.3 if wknr == 120
replace npd = 3.4 if wknr == 123
replace npd = 0.9 if wknr == 124
replace npd = 2.3 if wknr == 125
replace npd = 0.9 if wknr == 126
replace npd = 1.2 if wknr == 132
replace npd = 1.1 if wknr == 136
replace npd = 1.1 if wknr == 137
replace npd = 1.8 if wknr == 140
replace npd = 2.8 if wknr == 141
replace npd = 1.9 if wknr == 142
replace npd = 1.9 if wknr == 143
replace npd = 1.5 if wknr == 144
replace npd = 1.3 if wknr == 146
replace npd = 1.3 if wknr == 147
replace npd = 2.8 if wknr == 152
replace npd = 1.8 if wknr == 153
replace npd = 3.3 if wknr == 154
replace npd = 4.8 if wknr == 155
replace npd = 4.7 if wknr == 156
replace npd = 4.9 if wknr == 157
replace npd = 5.6 if wknr == 158
replace npd = 2.5 if wknr == 159
replace npd = 3.0 if wknr == 160
replace npd = 4.1 if wknr == 161
replace npd = 2.7 if wknr == 162
replace npd = 3.7 if wknr == 163
replace npd = 4.4 if wknr == 164
replace npd = 3.5 if wknr == 165
replace npd = 1.4 if wknr == 170
replace npd = 1.9 if wknr == 172
replace npd = 1.9 if wknr == 174
replace npd = 1.1 if wknr == 176
replace npd = 1.8 if wknr == 177
replace npd = 1.2 if wknr == 178
replace npd = 2.3 if wknr == 180
replace npd = 1.1 if wknr == 182
replace npd = 0.8 if wknr == 183
replace npd = 4.2 if wknr == 190
replace npd = 3.4 if wknr == 192
replace npd = 2.5 if wknr == 193
replace npd = 3.6 if wknr == 194
replace npd = 3.9 if wknr == 195
replace npd = 2.8 if wknr == 196
replace npd = 1.2 if wknr == 198
replace npd = 1.0 if wknr == 199
replace npd = 1.5 if wknr == 201
replace npd = 2.8 if wknr == 207
replace npd = 2.2 if wknr == 211
replace npd = 1.2 if wknr == 214
replace npd = 0.9 if wknr == 215
replace npd = 1.3 if wknr == 216
replace npd = 0.7 if wknr == 217
replace npd = 0.7 if wknr == 218
replace npd = 0.7 if wknr == 219
replace npd = 0.7 if wknr == 220
replace npd = 1.2 if wknr == 225
replace npd = 2.1 if wknr == 227
replace npd = 1.3 if wknr == 229
replace npd = 1.8 if wknr == 231
replace npd = 1.2 if wknr == 233
replace npd = 1.9 if wknr == 236
replace npd = 1.7 if wknr == 239
replace npd = 1.6 if wknr == 243
replace npd = 1.2 if wknr == 244
replace npd = 1.8 if wknr == 245
replace npd = 1.9 if wknr == 247
replace npd = 2.0 if wknr == 248
replace npd = 1.8 if wknr == 249
replace npd = 1.4 if wknr == 253
replace npd = 2.0 if wknr == 255
replace npd = 0.5 if wknr == 258
replace npd = 1.2 if wknr == 259
replace npd = 1.5 if wknr == 260
replace npd = 1.7 if wknr == 264
replace npd = 1.8 if wknr == 266
replace npd = 1.9 if wknr == 269
replace npd = 1.0 if wknr == 271
replace npd = 1.6 if wknr == 273
replace npd = 2.0 if wknr == 276
replace npd = 1.7 if wknr == 282
replace npd = 1.4 if wknr == 284
replace npd = 2.2 if wknr == 285
replace npd = 1.7 if wknr == 289
replace npd = 1.7 if wknr == 291
replace npd = 1.7 if wknr == 292
replace npd = 2.1 if wknr == 296

***auslander - Anteil Ausländer:innen der Bevölkerung am 31.12.2019 in % pro Wahlkreis (source: Der Bundeswahlleiter 2021c) 
gen auslander = .
replace auslander = 6.5 if wknr == 3
replace auslander = 8.7 if wknr == 6
replace auslander = 11.1 if wknr == 7
replace auslander = 5.7 if wknr == 9
replace auslander = 10.0 if wknr == 11
replace auslander = 4.0 if wknr == 13
replace auslander = 5.5 if wknr == 14
replace auslander = 4.7 if wknr == 15
replace auslander = 3.8 if wknr == 16
replace auslander = 21.8 if wknr == 18
replace auslander = 15.5 if wknr == 19
replace auslander = 13.2 if wknr == 20
replace auslander = 10.9 if wknr == 21
replace auslander = 14.8 if wknr == 22
replace auslander = 20.8 if wknr == 23
replace auslander = 6.5 if wknr == 24
replace auslander = 6.1 if wknr == 26
replace auslander = 8.6 if wknr == 27
replace auslander = 11.3 if wknr == 31
replace auslander = 8.1 if wknr == 33
replace auslander = 8.1 if wknr == 35
replace auslander = 7.8 if wknr == 36
replace auslander = 9.2 if wknr == 38
replace auslander = 18.2 if wknr == 41
replace auslander = 17.9 if wknr == 42
replace auslander = 7.2 if wknr == 44
replace auslander = 10.4 if wknr == 47
replace auslander = 11.0 if wknr == 49
replace auslander = 10.9 if wknr == 50
replace auslander = 19.1 if wknr == 53
replace auslander = 16.9 if wknr == 54
replace auslander = 20.3 if wknr == 55
replace auslander = 4.3 if wknr == 56
replace auslander = 4.5 if wknr == 57
replace auslander = 4.0 if wknr == 58
replace auslander = 7.6 if wknr == 61
replace auslander = 5.2 if wknr == 62
replace auslander = 5.9 if wknr == 63
replace auslander = 5.9 if wknr == 64
replace auslander = 3.6 if wknr == 66
replace auslander = 3.4 if wknr == 68
replace auslander = 8.6 if wknr == 69
replace auslander = 4.4 if wknr == 70
replace auslander = 3.5 if wknr == 71
replace auslander = 8.8 if wknr == 72
replace auslander = 5.0 if wknr == 73
replace auslander = 32.3 if wknr == 75
replace auslander = 12.5 if wknr == 76
replace auslander = 17.6 if wknr == 77
replace auslander = 20.1 if wknr == 78
replace auslander = 14.0 if wknr == 79
replace auslander = 24.0 if wknr == 80
replace auslander = 19.2 if wknr == 81
replace auslander = 24.2 if wknr == 82
replace auslander = 24.4 if wknr == 83
replace auslander = 9.5 if wknr == 84
replace auslander = 10.7 if wknr == 85
replace auslander = 16.5 if wknr == 86
replace auslander = 11.9 if wknr == 89
replace auslander = 9.7 if wknr == 92
replace auslander = 22.8 if wknr == 93
replace auslander = 14.6 if wknr == 94
replace auslander = 19.9 if wknr == 95
replace auslander = 17.2 if wknr == 96
replace auslander = 19.2 if wknr == 101
replace auslander = 16.4 if wknr == 103
replace auslander = 13.6 if wknr == 105
replace auslander = 20.5 if wknr == 106
replace auslander = 20.9 if wknr == 107
replace auslander = 13.5 if wknr == 108
replace auslander = 12.7 if wknr == 110
replace auslander = 15.3 if wknr == 112
replace auslander = 14.3 if wknr == 114
replace auslander = 19.4 if wknr == 115
replace auslander = 23.3 if wknr == 116
replace auslander = 14.5 if wknr == 118
replace auslander = 21.8 if wknr == 119
replace auslander = 12.4 if wknr == 120
replace auslander = 20.6 if wknr == 123
replace auslander = 11.9 if wknr == 124
replace auslander = 11.4 if wknr == 125
replace auslander = 7.5 if wknr == 126
replace auslander = 14.9 if wknr == 132
replace auslander = 6.8 if wknr == 136
replace auslander = 9.4 if wknr == 137
replace auslander = 13.9 if wknr == 140
replace auslander = 15.6 if wknr == 141
replace auslander = 14.7 if wknr == 142
replace auslander = 21.3 if wknr == 143
replace auslander = 10.3 if wknr == 144
replace auslander = 9.7 if wknr == 146
replace auslander = 9.1 if wknr == 147
replace auslander = 10.2 if wknr == 152
replace auslander = 9.1 if wknr == 153
replace auslander = 2.5 if wknr == 154
replace auslander = 3.2 if wknr == 155
replace auslander = 2.3 if wknr == 156
replace auslander = 4.6 if wknr == 157
replace auslander = 2.9 if wknr == 158
replace auslander = 9.8 if wknr == 159
replace auslander = 5.2 if wknr == 160
replace auslander = 4.0 if wknr == 161
replace auslander = 8.5 if wknr == 162
replace auslander = 1.9 if wknr == 163
replace auslander = 2.3 if wknr == 164
replace auslander = 3.9 if wknr == 165
replace auslander = 7.4 if wknr == 170
replace auslander = 10.7 if wknr == 172
replace auslander = 9.1 if wknr == 174
replace auslander = 14.6 if wknr == 176
replace auslander = 13.6 if wknr == 177
replace auslander = 12.8 if wknr == 178
replace auslander = 19.2 if wknr == 180
replace auslander = 33.0 if wknr == 182
replace auslander = 26.1 if wknr == 183
replace auslander = 4.3 if wknr == 190
replace auslander = 6.4 if wknr == 192
replace auslander = 8.5 if wknr == 193
replace auslander = 4.3 if wknr == 194
replace auslander = 3.3 if wknr == 195
replace auslander = 4.7 if wknr == 196
replace auslander = 8.5 if wknr == 198
replace auslander = 11.9 if wknr == 199
replace auslander = 10.3 if wknr == 201
replace auslander = 20.3 if wknr == 207
replace auslander = 10.3 if wknr == 211
replace auslander = 14.9 if wknr == 214
replace auslander = 15.2 if wknr == 215
replace auslander = 13.7 if wknr == 216
replace auslander = 28.7 if wknr == 217
replace auslander = 25.9 if wknr == 218
replace auslander = 25.8 if wknr == 219
replace auslander = 24.7 if wknr == 220
replace auslander = 12.6 if wknr == 225
replace auslander = 7.6 if wknr == 227
replace auslander = 10.5 if wknr == 229
replace auslander = 9.3 if wknr == 231
replace auslander = 12.5 if wknr == 233
replace auslander = 9.4 if wknr == 236
replace auslander = 9.6 if wknr == 239
replace auslander = 12.4 if wknr == 243
replace auslander = 24.0 if wknr == 244
replace auslander = 21.0 if wknr == 245
replace auslander = 11.8 if wknr == 247
replace auslander = 5.3 if wknr == 248
replace auslander = 9.4 if wknr == 249
replace auslander = 9.6 if wknr == 253
replace auslander = 14.0 if wknr == 255
replace auslander = 22.1 if wknr == 258
replace auslander = 27.7 if wknr == 259
replace auslander = 18.7 if wknr == 260
replace auslander = 16.5 if wknr == 264
replace auslander = 15.7 if wknr == 266
replace auslander = 13.5 if wknr == 269
replace auslander = 18.8 if wknr == 271
replace auslander = 15.5 if wknr == 273
replace auslander = 10.0 if wknr == 276
replace auslander = 14.8 if wknr == 282
replace auslander = 12.0 if wknr == 284
replace auslander = 14.6 if wknr == 285
replace auslander = 15.9 if wknr == 289
replace auslander = 16.2 if wknr == 291
replace auslander = 10.9 if wknr == 292
replace auslander = 16.4 if wknr == 296

***wbtg - Wahlbeteiligung bei der Bundestagswahl 2021 pro Wahlkreis (source: Der Bundeswahlleiter 2021a) 
gen wbtg = .
replace wbtg = 77.0 if wknr == 3
replace wbtg = 76.5 if wknr == 6
replace wbtg = 80.3 if wknr == 7
replace wbtg = 78.1 if wknr == 9
replace wbtg = 73.3 if wknr == 11
replace wbtg = 71.4 if wknr == 13
replace wbtg = 74.2 if wknr == 14
replace wbtg = 70.1 if wknr == 15
replace wbtg = 69.7 if wknr == 16
replace wbtg = 74.2 if wknr == 18
replace wbtg = 81.4 if wknr == 19
replace wbtg = 83.0 if wknr == 20
replace wbtg = 84.3 if wknr == 21
replace wbtg = 74.5 if wknr == 22
replace wbtg = 71.3 if wknr == 23
replace wbtg = 71.9 if wknr == 24
replace wbtg = 71.0 if wknr == 26
replace wbtg = 76.0 if wknr == 27
replace wbtg = 77.4 if wknr == 31
replace wbtg = 75.6 if wknr == 33
replace wbtg = 74.1 if wknr == 35
replace wbtg = 80.1 if wknr == 36
replace wbtg = 75.9 if wknr == 38
replace wbtg = 72.9 if wknr == 41
replace wbtg = 75.5 if wknr == 42
replace wbtg = 73.7 if wknr == 44
replace wbtg = 76.0 if wknr == 47
replace wbtg = 73.3 if wknr == 49
replace wbtg = 75.0 if wknr == 50
replace wbtg = 75.5 if wknr == 53
replace wbtg = 75.9 if wknr == 54
replace wbtg = 67.2 if wknr == 55
replace wbtg = 70.9 if wknr == 56
replace wbtg = 71.6 if wknr == 57
replace wbtg = 78.3 if wknr == 58
replace wbtg = 81.9 if wknr == 61
replace wbtg = 76.9 if wknr == 62
replace wbtg = 74.4 if wknr == 63
replace wbtg = 74.9 if wknr == 64
replace wbtg = 68.1 if wknr == 66
replace wbtg = 66.6 if wknr == 68
replace wbtg = 68.4 if wknr == 69
replace wbtg = 67.9 if wknr == 70
replace wbtg = 64.9 if wknr == 71
replace wbtg = 70.8 if wknr == 72
replace wbtg = 68.3 if wknr == 73
replace wbtg = 73.5 if wknr == 75
replace wbtg = 78.4 if wknr == 76
replace wbtg = 72.8 if wknr == 77
replace wbtg = 70.2 if wknr == 78
replace wbtg = 81.4 if wknr == 79
replace wbtg = 79.1 if wknr == 80
replace wbtg = 76.9 if wknr == 81
replace wbtg = 70.9 if wknr == 82
replace wbtg = 78.4 if wknr == 83
replace wbtg = 76.6 if wknr == 84
replace wbtg = 69.3 if wknr == 85
replace wbtg = 72.5 if wknr == 86
replace wbtg = 75.6 if wknr == 89
replace wbtg = 77.4 if wknr == 92
replace wbtg = 73.9 if wknr == 93
replace wbtg = 84.5 if wknr == 94
replace wbtg = 75.9 if wknr == 95
replace wbtg = 80.6 if wknr == 96
replace wbtg = 73.7 if wknr == 101
replace wbtg = 74.2 if wknr == 103
replace wbtg = 77.3 if wknr == 105
replace wbtg = 79.3 if wknr == 106
replace wbtg = 74.8 if wknr == 107
replace wbtg = 76.0 if wknr == 108
replace wbtg = 77.8 if wknr == 110
replace wbtg = 75.9 if wknr == 112
replace wbtg = 74.9 if wknr == 114
replace wbtg = 72.6 if wknr == 115
replace wbtg = 63.3 if wknr == 116
replace wbtg = 76.4 if wknr == 118
replace wbtg = 67.5 if wknr == 119
replace wbtg = 80.3 if wknr == 120
replace wbtg = 66.7 if wknr == 123
replace wbtg = 77.5 if wknr == 124
replace wbtg = 74.6 if wknr == 125
replace wbtg = 80.6 if wknr == 126
replace wbtg = 76.3 if wknr == 132
replace wbtg = 77.9 if wknr == 136
replace wbtg = 77.0 if wknr == 137
replace wbtg = 76.4 if wknr == 140
replace wbtg = 70.7 if wknr == 141
replace wbtg = 75.4 if wknr == 142
replace wbtg = 72.2 if wknr == 143
replace wbtg = 76.1 if wknr == 144
replace wbtg = 77.2 if wknr == 146
replace wbtg = 78.1 if wknr == 147
replace wbtg = 74.8 if wknr == 152
replace wbtg = 78.2 if wknr == 153
replace wbtg = 76.2 if wknr == 154
replace wbtg = 75.8 if wknr == 155
replace wbtg = 77.0 if wknr == 156
replace wbtg = 75.0 if wknr == 157
replace wbtg = 77.2 if wknr == 158
replace wbtg = 79.2 if wknr == 159
replace wbtg = 80.8 if wknr == 160
replace wbtg = 76.2 if wknr == 161
replace wbtg = 74.6 if wknr == 162
replace wbtg = 77.5 if wknr == 163
replace wbtg = 76.7 if wknr == 164
replace wbtg = 74.4 if wknr == 165
replace wbtg = 76.1 if wknr == 170
replace wbtg = 74.3 if wknr == 172
replace wbtg = 78.4 if wknr == 174
replace wbtg = 80.1 if wknr == 176
replace wbtg = 78.5 if wknr == 177
replace wbtg = 78.1 if wknr == 178
replace wbtg = 74.6 if wknr == 180
replace wbtg = 72.1 if wknr == 182
replace wbtg = 77.0 if wknr == 183
replace wbtg = 73.5 if wknr == 190
replace wbtg = 74.8 if wknr == 192
replace wbtg = 76.4 if wknr == 193
replace wbtg = 73.2 if wknr == 194
replace wbtg = 75.9 if wknr == 195
replace wbtg = 74.4 if wknr == 196
replace wbtg = 76.1 if wknr == 198
replace wbtg = 76.2 if wknr == 199
replace wbtg = 75.7 if wknr == 201
replace wbtg = 73.4 if wknr == 207
replace wbtg = 78.9 if wknr == 211
replace wbtg = 81.8 if wknr == 214
replace wbtg = 83.1 if wknr == 215
replace wbtg = 78.6 if wknr == 216
replace wbtg = 78.5 if wknr == 217
replace wbtg = 80.0 if wknr == 218
replace wbtg = 80.6 if wknr == 219
replace wbtg = 81.8 if wknr == 220
replace wbtg = 78.5 if wknr == 225
replace wbtg = 76.5 if wknr == 227
replace wbtg = 76.9 if wknr == 229
replace wbtg = 76.5 if wknr == 231
replace wbtg = 80.2 if wknr == 233
replace wbtg = 81.4 if wknr == 236
replace wbtg = 77.0 if wknr == 239
replace wbtg = 78.9 if wknr == 243
replace wbtg = 77.1 if wknr == 244
replace wbtg = 73.1 if wknr == 245
replace wbtg = 80.4 if wknr == 247
replace wbtg = 81.4 if wknr == 248
replace wbtg = 81.3 if wknr == 249
replace wbtg = 82.1 if wknr == 253
replace wbtg = 78.0 if wknr == 255
replace wbtg = 82.1 if wknr == 258
replace wbtg = 74.6 if wknr == 259
replace wbtg = 79.5 if wknr == 260
replace wbtg = 79.3 if wknr == 264
replace wbtg = 80.9 if wknr == 266
replace wbtg = 77.1 if wknr == 269
replace wbtg = 77.6 if wknr == 271
replace wbtg = 75.8 if wknr == 273
replace wbtg = 77.4 if wknr == 276
replace wbtg = 75.3 if wknr == 282
replace wbtg = 76.1 if wknr == 284
replace wbtg = 75.5 if wknr == 285
replace wbtg = 77.2 if wknr == 289
replace wbtg = 79.5 if wknr == 291
replace wbtg = 78.8 if wknr == 292
replace wbtg = 74.0 if wknr == 296
